Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

175
Visualizações
Firefox extension - retrieve href from class |works| - opening new window or start to download from given url - not working

I wrote an extension that should get the content of a specific href link. It should then open the url without user interaction.

The script I've been working on so far gets the correct url. It can print the url in a push notification. The basics of the FF extension work.

But no matter what I've tried (open.window, browser.downloads., window.location) never has a window opened or the download started when visting the domain / website containing the hidden--Element.

I'm a total beginner but I would like to get this script to work. This would motivate me to keep on learning.

This is from the manifest.json

"permissions": ["downloads.open", "downloads", "webRequest", "tabs"],
"content_scripts": [
{
    "matches": ["*://*.thedomain.org/*"],
    "js": ["border.js", "jquery-3.6.0.min.js", "adskip.js"],
"run_at": "document_end"

this is the content of adskip.js

for(var i=0; i<l.length; i++) {
  arringo.push(l[i].href);
}

alert(arringo);

function redirect() {
    location.href = arringo;
}
addEventListener('load', redirect);


I added the permissions in the manifest.json but I'm not sure whether I need them / another ones / or not at all.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda